import "reset.css"
import "pixi.js"

var canvas = document.createElement('canvas')
canvas.style.position = 'absolute'
canvas.style.overflow = 'hidden'
canvas.style.width = "70%"
canvas.style.left = "15%"
canvas.style.height = "50%"
canvas.style.top = "25%"
document.body.appendChild(canvas)

var renderer = PIXI.autoDetectRenderer(750, 1334, {
    view: canvas,
    backgroundColor: 0xffffff
})

var stage = new PIXI.Container

var BaseTexture = PIXI.BaseTexture.from('assets/bunny.png');
BaseTexture.on('loaded', function () {
    var Sprite = PIXI.Sprite.from(BaseTexture)
    Sprite.width = 375
    Sprite.height = 667
    Sprite.interactive = true
    stage.addChild(Sprite)
    Sprite.on('tap', function () {
        console.log('haha')
    })
    renderer.render(stage)
})




